﻿<Page x:Class="NewMarkersSample.Pages.RotatedEllipsesPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	  xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
    Title="RotatedEllipses" Loaded="Page_Loaded">
	<Grid>
		<d3:ChartPlotter Name="plotter">
			<d3:MarkerChart Name="chart" ItemsSource="{Binding}">
				<d3:TemplateMarkerGenerator>
					<DataTemplate>
						<Grid>
							<Ellipse Name="ellipse" Stretch="Fill" RenderTransformOrigin="0.5,0.5"/>
							<Polygon Points="0.4,0 0.6,0 0.6,0.4 1.0,0.4 1.0,0.6, 0.6,0.6 0.6,1.0 0.4,1.0 0.4,0.6 0,0.6 0,0.4 0.4,0.4" 
								 Fill="White" Stroke="Black" MaxWidth="16" MaxHeight="16" Stretch="Uniform" RenderTransformOrigin="0.5,0.5">
								<Polygon.RenderTransform>
									<RotateTransform Angle="45"/>
								</Polygon.RenderTransform>
							</Polygon>
						</Grid>
					</DataTemplate>
				</d3:TemplateMarkerGenerator>
			</d3:MarkerChart>
			
			<Button Content="Add random ellipse" Name="AddRandomEllipseBtn" Click="AddRandomEllipseBtn_Click"/>
		</d3:ChartPlotter>
	</Grid>
</Page>
